<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // toFixed 里面有值 就是 截取 多少位
    //没有就是取整
    let num = 1.111111111111111
    console.log(num.toFixed(2))
    
  </script>
</body>
</html>